﻿@model IEnumerable<Exam.Models.Topic>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table class="table">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.TopicExplain)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.TopicScore)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.TopicType)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.TopicA)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.TopicB)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.TopicC)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.TopicD)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.TopicSort)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.TopicAnswer)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Paper.PaperName)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.TopicExplain)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.TopicScore)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.TopicType)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.TopicA)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.TopicB)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.TopicC)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.TopicD)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.TopicSort)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.TopicAnswer)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Paper.PaperName)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.TopicID }) |
            @Html.ActionLink("Details", "Details", new { id=item.TopicID }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.TopicID })
        </td>
    </tr>
}

</table>
